package pentago.engine;

import org.newdawn.slick.Image;
import org.newdawn.slick.Input;

public class ConfirmButton extends ClickableObject {

    public ConfirmButton(GameEngine gameEngine, int xPos, int yPos, Image img,
	    float scale) {
	super(gameEngine, xPos, yPos, img);
	this.width *= scale;
	this.height *= scale;
    }

    @Override
    public void executeClick(int xPos, int yPos, int button) {

	if (button != Input.MOUSE_LEFT_BUTTON)
	    return;

	if (!isClicked(xPos, yPos))
	    return;

	gameEngine.confirmClicked();
    }

    public int getX() {
	return xPos;
    }

    public int getY() {
	return yPos;
    }

}
